﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage/AdminMasterPage.master"
    AutoEventWireup="true" CodeFile="Sec003.aspx.cs" Inherits="Admin_Sys_Sec_Sec003" %>

<asp:Content ID="script" ContentPlaceHolderID="phScript" runat="server">
    <script type="text/javascript">
        $(
           function () {
               $("span[P_N] input:first-child").click(function () {
                   var pn = $(this).parent().attr("P_N");
                   $("span[S_P_N=" + pn + "] input:first-child").prop("checked", $(this).is(":checked"));
               });
           }
          );

    </script>
</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 100%; min-width: 700px">
        <div style="padding-right: 12px">
            <table width="100%" cellspacing="0" cellpadding="0" class="AddTable">
                <tr>
                    <td width="80px">
                        角色名称
                    </td>
                    <td>
                        <yncWebDDL:DrpRoles ID="drpRoles" AutoPostBack="true" ShowSelectedItem="false" OnSelectedIndexChanged = "drpRoles_SelectedIndexChanged" runat="server">
                        </yncWebDDL:DrpRoles>
                    </td>
                    <td width="60px" align="center">
                    </td>
                </tr>
            </table>
        </div>
        <yncWeb:PagnationGrid ID="pageGrid" IsPagination="false" runat="server" OnOnPageIndexChange="PageChanged"
            OnItemDataBound="system_ItemBound">
            <HeaderTemplate>
                <table width="100%" cellspacing="0" cellpadding="0" class="pagnationtable">
            </HeaderTemplate>
            <ItemTemplate>
                <thead>
                    <tr>
                        <th>
                            <%# DataBinder.Eval(Container.DataItem,TSSystemMetadata.ColumnNames.SystemName)%>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>
                            <yncWeb:PagnationGrid ID="gridChannels" IsPagination="false" runat="server" OnItemDataBound="channel_ItemBound">
                                <HeaderTemplate>
                                    <table width="100%" cellspacing="0" cellpadding="0" class="pagnationtable">
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <thead>
                                        <tr>
                                            <th width="30px" class="center">
                                                <asp:CheckBox ID="chkAll" P_N="<%#Eval(TSFunctionsMetadata.ColumnNames.FunctionID)%>"
                                                    runat="server" />
                                                <input runat="server" id="txtId" name="txtId" type="hidden" value="<%#Eval(TSFunctionsMetadata.ColumnNames.FunctionID)%>" />
                                            </th>
                                            <th colspan="2">
                                                <%# DataBinder.Eval(Container.DataItem,TSFunctionsMetadata.ColumnNames.FunctionName)%>
                                            </th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <asp:Repeater ID="gridFunctions" OnItemDataBound="functions_ItemDataBound" runat="server">
                                            <ItemTemplate>
                                                <tr>
                                                    <td class="center">
                                                        <asp:CheckBox ID="chkFunction" S_P_N="<%#Eval(TSFunctionsMetadata.ColumnNames.ParentID)%>"
                                                            runat="server" />
                                                        <input runat="server" id="txtId" name="txtId" type="hidden" value="<%#Eval(TSFunctionsMetadata.ColumnNames.FunctionID)%>" />
                                                    </td>
                                                    <td width="180px">
                                                        <%#Eval(TSFunctionsMetadata.ColumnNames.FunctionName)%>(<%#Eval(TSFunctionsMetadata.ColumnNames.FunctionCode)%>)
                                                    </td>
                                                    <td>
                                                        <%#Eval(TSFunctionsMetadata.ColumnNames.FunctionURL) %>
                                                    </td>
                                                </tr>
                                            </ItemTemplate>
                                            <AlternatingItemTemplate>
                                                <tr class="odd">
                                                    <td class="center">
                                                        <asp:CheckBox ID="chkFunction" S_P_N="<%#Eval(TSFunctionsMetadata.ColumnNames.ParentID)%>"
                                                            runat="server" />
                                                        <input runat="server" id="txtId" name="txtId" type="hidden" value="<%#Eval(TSFunctionsMetadata.ColumnNames.FunctionID)%>" />
                                                    </td>
                                                    <td width="180px">
                                                        <%#Eval(TSFunctionsMetadata.ColumnNames.FunctionName)%>(<%#Eval(TSFunctionsMetadata.ColumnNames.FunctionCode)%>)
                                                    </td>
                                                    <td>
                                                        <%#Eval(TSFunctionsMetadata.ColumnNames.FunctionURL)%>
                                                    </td>
                                                </tr>
                                            </AlternatingItemTemplate>
                                        </asp:Repeater>
                                </ItemTemplate>
                                <FooterTemplate>
                                    </tbody> </table>
                                </FooterTemplate>
                            </yncWeb:PagnationGrid>
                        </td>
                    </tr>
            </ItemTemplate>
            <FooterTemplate>
                </tbody> </table>
            </FooterTemplate>
        </yncWeb:PagnationGrid>
        <div style="padding-left: 12px;">
            <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
            <br />
            <br />
            <asp:Label ID="lblMessage" runat="server" ForeColor="red"></asp:Label>
        </div>
    </div>
</asp:Content>
